if (NOT KLAYGE_PLATFORM_WINDOWS_DESKTOP)
	return()
endif()

SET(KGECONFIG_SOURCE_FILES
	${KLAYGE_PROJECT_DIR}/Core/Src/KGEConfig/KGEConfig.cpp
)

SET(KGECONFIG_HEADER_FILES
	${KLAYGE_PROJECT_DIR}/Core/Src/KGEConfig/resource.h
)

SET(KGECONFIG_RESOURCE_FILES
	${KLAYGE_PROJECT_DIR}/Core/Src/KGEConfig/KGEConfig.rc
	${KLAYGE_PROJECT_DIR}/klayge_logo.ico
)

SOURCE_GROUP("Source Files" FILES ${KGECONFIG_SOURCE_FILES})
SOURCE_GROUP("Header Files" FILES ${KGECONFIG_HEADER_FILES})
SOURCE_GROUP("Resource Files" FILES ${KGECONFIG_RESOURCE_FILES})

ADD_EXECUTABLE(KGEConfig WIN32
	${KGECONFIG_SOURCE_FILES} ${KGECONFIG_HEADER_FILES} ${KGECONFIG_RESOURCE_FILES}
	${KLAYGE_PROJECT_DIR}/bin/KlayGE.cfg
)

ADD_DEPENDENCIES(KGEConfig AllInEngine)

SET_TARGET_PROPERTIES(KGEConfig PROPERTIES
	DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}
	CXX_VISIBILITY_PRESET hidden
	VISIBILITY_INLINES_HIDDEN ON
	OUTPUT_NAME KGEConfig${KLAYGE_OUTPUT_SUFFIX}
	FOLDER "KlayGE/Engine/KGEConfig"
)

target_link_libraries(KGEConfig
	PRIVATE
		KlayGE_Core
)
